function HRPanel_Code() {
	var buffer = new StringBuffer();
	buffer.append('<div id="content" class="content" style="margin-top: 0px;">');
	buffer.append('<div class="smalltitle">全部应用 (长按可以加入到常用哦，试试吧)</div>');
	buffer.append('<div class="often border-top-bottom allapp">');
	if(User.HR_Menu.indexOf(",28,")>-1 && User.RolePower.indexOf(",28,")>-1) buffer.append('<div val="28" class="line" tablename="员工管理"><div class="icon"><img src="img/users.png"/></div><div class="name">员工管理</div></div>');
	if(User.HR_Menu.indexOf(",29,")>-1 && User.RolePower.indexOf(",29,")>-1) buffer.append('<div val="29" class="line" tablename="组织架构"><div class="icon"><img src="img/depart.png"/></div><div class="name">组织架构</div></div>');
	if(User.HR_Menu.indexOf(",38,")>-1 && User.RolePower.indexOf(",38,")>-1) buffer.append('<div val="38" class="line" tablename="薪资管理"><div class="icon"><img src="img/salary.png"/></div><div class="name">薪资管理</div></div>');
	if(User.HR_Menu.indexOf(",39,")>-1 && User.RolePower.indexOf(",39,")>-1) buffer.append('<div val="39" class="line" tablename="员工合同"><div class="icon"><img src="img/agreement.png"/></div><div class="name">员工合同</div></div>');
	if(User.HR_Menu.indexOf(",40,")>-1 && User.RolePower.indexOf(",40,")>-1) buffer.append('<div val="40" class="line" tablename="员工社保"><div class="icon"><img src="img/security.png"/></div><div class="name">员工社保</div></div>');
	if(User.HR_Menu.indexOf(",41,")>-1 && User.RolePower.indexOf(",41,")>-1) buffer.append('<div val="41" class="line" tablename="社保设置"><div class="icon"><img src="img/securityset.png"/></div><div class="name">社保设置</div></div>');
	if(User.HR_Menu.indexOf(",42,")>-1 && User.RolePower.indexOf(",42,")>-1) buffer.append('<div val="42" class="line" tablename="员工生日"><div class="icon"><img src="img/birth.png"/></div><div class="name">员工生日</div></div>');
	if(User.HR_Menu.indexOf(",43,")>-1 && User.RolePower.indexOf(",43,")>-1) buffer.append('<div val="43" class="line" tablename="招聘管理"><div class="icon"><img src="img/zhaopin.png"/></div><div class="name">招聘管理</div></div>');
	if(User.HR_Menu.indexOf(",44,")>-1 && User.RolePower.indexOf(",44,")>-1) buffer.append('<div val="44" class="line" tablename="奖罚管理"><div class="icon"><img src="img/jiang.png"/></div><div class="name">奖罚管理</div></div>');
	if(User.HR_Menu.indexOf(",45,")>-1 && User.RolePower.indexOf(",45,")>-1) buffer.append('<div val="45" class="line" tablename="发工资"><div class="icon"><img src="img/fagongzi.png"/></div><div class="name">发工资</div></div>');
	buffer.append('<div class="line" tablename="添加应用"><div class="icon"><img src="img/addapp.png"/></div><div class="name">添加应用</div></div>');
	buffer.append('</div>');
	buffer.append('</div>');
	return buffer.toString();
};

function Init_HRPanel(classname)
{
	if(classname==".allapp"){
		//FindHRReport();
	}
	$("#contentlist0").css("background","#ececec");
	Set_Often_Menu(classname);
	mui(classname).on("tap",".line",function(){
		var tablename=$(this).attr("tablename");
		var tableid=$(this).attr("tableid");
		var tablechar=$(this).attr("tablechar");
		var info=$(this);
	      					if(tablename=="员工管理")
							{
								myScroll1 = OpenScroll(1,tablename+"列表","<font>+</font>",function(pageindex){
										Receive_User(pageindex);
								},function(){
									OpenWindow(2,"新增员工","保存",function(){
										Save_User();
									});
									$("#contentlist2").html(UserAdd_Code(0));
									Init_UserAdd();
								},User_Code(),70);
								Receive_User(1);
								Init_User_Code();
							}else if(tablename=="组织架构")
							{
								OpenWindow(1,tablename+"列表","<font>+</font>",function(){
									OpenWindow(2,"部门","保存",function(){
										Save_Depart();
									});
									$("#contentlist2").html(DepartAdd_Code(0,0,"",0,""));
									Init_DepartAdd();
								});
								Receive_Depart(1);
							}else if(tablename=="薪资管理")
							{
								myScroll1 = OpenScroll(1,tablename+"列表","",function(pageindex){
										Receive_Salary(pageindex);
								},function(){
									
								},Salary_Code(),70);
								Receive_Salary(1);
								Init_Salary_Code();
							}else if(tablename=="员工合同")
							{
								myScroll1 = OpenScroll(1,tablename+"列表","",function(pageindex){
										Receive_Agreement(pageindex);
								},function(){
									
								},Agreement_Code(),70);
								Receive_Agreement(1);
								Init_Agreement_Code();
							}else if(tablename=="员工社保")
							{
								myScroll1 = OpenScroll(1,tablename+"列表","",function(pageindex){
										Receive_Security(pageindex);
								},function(){
									
								},Security_Code(),70);
								Receive_Security(1);
								Init_Security_Code();
							}
							else if(tablename=="社保设置")
							{
								OpenWindow(1,"社保设置","保存",function(){
									Save_SecurityPercent();
								});
								$("#contentlist1").html(SecurityPercent_Code());
							}
							else if(tablename=="员工生日")
							{
								OpenWindow(1,"本月生日员工","",function(){
								});
								$("#contentlist1").html(UserBirth_Code());
								$("#contentlist1").append(UserBirth_Data());
							}else if(tablename=="招聘管理")
							{
								myScroll1 = OpenScroll(1,tablename+"列表","<font>+</font>",function(pageindex){
										Receive_Employ(pageindex);
								},function(){
									OpenWindow(2,"新增应聘","保存",function(){
										Save_Employ();
									});
									$("#contentlist2").html(EmployAdd_Code(0));
									Init_EmployAdd();
								},Employ_Code(),70);
								Receive_Employ(1);
								Init_Employ_Code();
							}else if(tablename=="奖罚管理")
							{
								OpenWindow(1,"奖罚管理","<font>+</font>",function(){
									OpenWindow(2,"新增奖罚","保存",function(){
										Save_Reward(0);
									});
									OtherReward_Code("",100,1,"");
								});
								Reward_Code();
							}else if(tablename=="发工资")
							{
								myScroll1 = OpenScroll(1,"工资列表","",function(pageindex){
										Receive_Wages(pageindex);
								},function(){
									
								},Wages_Code(),70);
								Receive_Wages(1);
								Init_Wages_Code();
							}
							else if(tablename=="添加应用")
							{
								OpenWindow2(2,"添加应用","",function(){
								});
								$("#contentlist2").html("");
								addhr.removeClass("hidden");
								$("#contentlist2").append(addhr);
							}
	});
};